<?php

/**
 * /application/core/MY_Loader.php
 *
 */
class MY_Loader {
    public function template($template_name, $vars = array(), $return = FALSE)
    {
        $content  = $this->view('includes/header', $vars, $return);
        $content .= $this->view($template_name, $vars, $return);
        $content .= $this->view('includes/footer', $vars, $return);

        if ($return)
        {
            return $content;
        }
    }
    
    function index(){
        $data = array();
        $data['test'] = 'include/header';
        $this->load->template('home');
    }
}
